﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MySqlTest
{
    public partial class Form1 : Form
    {

        public Form1()
        {
            InitializeComponent();
        }

        private void onlineToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataTable tbl = new DataTable("Tbl");
            Ko2.DB.MySql mysql = new Ko2.DB.MySql();
            Exception err = mysql.GetTradeOnline(ref tbl, DateTime.Now.AddDays(-5));
            if (err == null)
                gv.DataSource = tbl;
        }

        private void gettrmoutshiftcloseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataTable tbl = new DataTable("Tbl");
            Ko2.DB.MySql mysql = new Ko2.DB.MySql();
            Exception err = mysql.Get_trm_out_shift_close(ref tbl, 3, 3);
            if (err == null)
                gv.DataSource = tbl;
        }

        private void getShopNamesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataTable tbl = new DataTable("Tbl");
            Ko2.DB.MySql mysql = new Ko2.DB.MySql();
            Exception err = mysql.GetShopNames(ref tbl);
            if (err == null)
                gv.DataSource = tbl;
        }


    }
}
